/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.scene.service.api;

import com.koron.common.bean.StaffBean;
import com.koron.common.domain.DataBean;
import com.koron.scene.domain.HealthDocumentation;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface HealthDocumentationService {

    /**
     * fetch all document in the given condition
     * @param corpCode
     * @param name
     * @param documentationTypeId
     * @param deptCode
     * @param start
     * @param rows
     * @return
     */
    DataBean<HealthDocumentation> fetchDocuments(String corpCode, String name, String documentationTypeId, String deptCode, Integer start, Integer rows);


    /**
     * query the one whose id is the given
     * @param id
     * @return
     */
    HealthDocumentation fetchOne(String id);


    /**
     * delete document in batch
     * @param idList
     * @return
     */
    Boolean batchDetele(List<String> idList);

    /**
     * write document
     * @return
     */
    Integer persist(HealthDocumentation document, MultipartFile[] files, String delFileAddress, String keepFileAddress, String delPreFileAddress, String keepPreFileAddress);

    /**
     * 职业健康档案列表导出
     * @param user
     * @param corpCode
     * @param name
     * @param documentationTypeId
     * @param manager
     * @return
     */
    List<HealthDocumentation> exportList(StaffBean user, String corpCode, String name, String documentationTypeId, String manager);

}
